-- GENERATED SPELL FOR [Splintertree Raider] --


function spell0_12859(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_12859', 576, 1)
end

function spell1_12859(pUnit, Event) --@Shield Bash,n/a--
pUnit:FullCastSpellOnTarget(11972,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12859', 8262, 1)
end

function Sorts_12859(pUnit, Event)
local choix_sorts_12859 = math.random(0, 1)
if choix_sorts_12859 == 0 then
pUnit:RegisterEvent('spell0_12859', 1, 1)
end
if choix_sorts_12859 == 1 then
pUnit:RegisterEvent('spell1_12859', 1, 1)
end
end

function mob12859_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12859', math.random(1500, 3000), 1)
end

function mob12859_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12859_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12859_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12859, 1, 'mob12859_Action')
RegisterUnitEvent(12859, 2, 'mob12859_Leave')
RegisterUnitEvent(12859, 3, 'mob12859_Kill')
RegisterUnitEvent(12859, 4, 'mob12859_Die')
